<?php
global $base_path;
$path = $base_path.drupal_get_path('module', 'ltod');
module_load_include('inc', 'ltod', 'ltod');

?>
<div id="product-container">
	<div id="product-content">
		<img
			src="<?php echo $base_path.$node->image ?>"
			width="475" height="475" />
	</div>
	<div id="product-sidebar">
		<div class="product-price">
			<span class="price"><?php echo (t("Price: ").number_format($node->price)." ".$node->currency)?></span><br />
			<span class="real-price"><?php echo (t("Real price: ").number_format($node->real_price))?></span>
			<?php $sale_off_percent = ($node->real_price && $node->real_price>0)? number_format((($node->real_price - $node->price)/$node->real_price)*100,2):'0.00'; ?>
			<span><?php echo (t("Sale off: ").$sale_off_percent." %")?> </span>

		</div>
		<div class="buy-now">
            <?php if ($node->bid_info['mode'] == 'buy') { ?>
			<a id='buy_button_id' href="#"> <img
				src="<?php echo $path?>/images/button_buynow.png" /> </a>
            <?php }else if($node->bid_info['mode']=='bid'){ ?>
            <a id="bid_button_id" href="#"> <img
				src="<?php echo $path?>/images/btn_bidNow.jpg" /> </a>
            <?php } ?>
		</div>
		<div class="people">
			<div>
			<img src="<?php echo $path?>/images/group_of_people.png" />
			</div>
			<div>			
			<span><?php echo(t("Number registed user(s): ").number_format($node->counter_register)) ?>
			</span><br /> <span><?php echo(t("Number bought user(s): ").number_format($node->counter_register_success)) ?>
			</span><br /> <span><?php echo(t("Bonus money(s): ").number_format($node->direct_ref+ $node->indirect_ref)) ?>
			</span>
			</div>
		</div>
		<div style="clear: both;"></div>
		<div class="clock">
			<img src="<?php echo $path?>/images/clock.png" /> <input
				type="hidden" value="<?php echo $node->end_date?>"
				id="product-timer-end" /> <span id="product-timer"><?php $diff = get_date_diff(time(),$node->end_date); 
				echo($diff['days'] ." day(s):". $diff['hours'] ." hour(s):".$diff['minutes']." minute(s):".$diff['seconds']." second(s)");?>
			</span>
		</div>
	</div>
	<div id="product-footer"></div>
</div>
<?php echo $bid_form; ?>